﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["accountName"] != null)
        {
            accountName.InnerHtml = "Xin chào: " + Session["accountName"].ToString() + ".";
            accountType.InnerHtml = "Quyền hạn: " + Session["accountType"].ToString() + ".";
        }
        else
        {
            Response.Redirect("./");
        }
    }

    protected void logout_Click(object sender, EventArgs e)
    {
        Session.Contents.Remove("accountName");
        Session.Contents.Remove("accountType");
        Response.Redirect("Default.aspx", false);
    }
}
